package com.example.controller;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
@RequestMapping("/userInfo")
public class UserInfoController {

    @RequestMapping("/userList")
    public String info(){
        return "user";
    }

    @RequestMapping("/userAdd")
    public String userAdd(){
        return "userAdd";
    }

    @RequestMapping("/userDel")
    @RequiresPermissions("userInfo:view")
    public String userDel(){
        return "userDel";
    }

    @RequestMapping("/userDel1")
    public String userDel(HttpServletRequest request, HttpServletResponse response){

        String str = request.getRemoteAddr();
        return "userDel";
    }

}
